﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class registration : System.Web.UI.Page
{
    DtataBaseclass database = new DtataBaseclass();
    Kidclass kid = new Kidclass();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click1(object sender, EventArgs e)
    {
        kid.name = this.Name.Text;
        kid.Password = this.Password.Text;
        kid.Level = this.Level.Text;
        kid.phone_number = this.Phone.Text; ;

        database.registerationselect(kid.name, kid.Password, kid.Level, kid.Gendar, kid.phone_number);

        if (database.query != null)
        {
            Response.Write("registeration is successful");
            Response.Redirect("AboutUs.aspx");
        }
        else
        {
            Response.Write("you can not use this name and password");
        }

    }
    protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        kid.Gendar = this.gendar.Text;
    }
}